package com.example.easycodetest.controller;

import com.example.easycodetest.entity.${entityName};
import com.example.easycodetest.service.${entityName}Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 文章信息表，存储已发布的文章(${entityName})表控制层
 *
 * @author makejava
 * @since 2022-10-19 14:26:36
 */
@RestController
@RequestMapping("apArticle")
public class ${entityName}Controller {
    /**
     * 服务对象
     */
    @Resource
    private ${entityName}Service apArticleService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("selectOne")
    public ${entityName} selectOne(Long id) {
        return this.apArticleService.queryById(id);
    }

}
